@extends('layouts.admin')

@section('content')
    <script type="application/javascript" src="{{url()}}/js/table.js"></script>

    <div class="modal-msg"></div>
    <div class="panel panel-info">
        <div class="panel-heading">
            <h3 class="panel-title">Notice</h3>
        </div>
        <div class="panel-body">
            <p class="text-justify text-info panel-body">When you create an entity, you must specify a
                PartitionKey and RowKey. These are the unique identifiers
                for an entity and are values that can be queried much faster than other entity properties. The system
                uses
                PartitionKey to automatically distribute the table's entities over many storage nodes. Entities with the
                same
                PartitionKey are stored on the same node. (Operations on multiple entities stored on the same node
                perform
                better than on entities stored across different nodes.) The RowKey is the unique ID of an entity within
                a
                partition.</p></div>
    </div>
    <hr>
    <div class="entity-wrapper">
        <div class="form-group ">
            <div class="row">
                <div class="col-md-2">
                    <label>Table Name</label>
                </div>
                <div class="col-md-6"><input required="required" type="text" name="table"
                                             placeholder="Table Name e.g., Users"
                                             class="form-control table-name"></div>
            </div>
        </div>
        <div class="clearfix"></div>
        <div class="form-group">
            <div class="row">
                <div class="col-md-2">
                    <label>Partition Key</label>
                </div>
                <div class="col-md-6"><input required="required" type="text" name="partitionkey"
                                             placeholder="Partition Key e.g., Administrators"
                                             class="form-control partition-name">
                </div>
            </div>
        </div>
        <form action="#" class="form entity-form" method="post">

        </form>
        <button onclick="createEntity()" class="margin-bottom-10 btn btn-md btn-primary">Create Entity</button>
        <button class="margin-bottom-10 btn btn-md btn btn-default" onclick="addField()">Add Field</button>

    </div>
@endsection

